<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/5/22
  Time: 13:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改带宽</title>
</head>
<body>
<div style="border: 1px solid #E6E6E6;width: 350px;margin:auto;">
    <form id="editBandwidthForm" style="margin-top: 20px;font-size: 15px;font-family: 微软雅黑;">
        <input type="hidden" name="id">
        <div style="margin-bottom:20px;text-align: center;">
            <input class="easyui-textbox" name="specification" data-options="label:'规格',width:300,height:30,required:true,missingMessage:'规格不能为空！'">
        </div>
        <div style="margin-bottom:20px;text-align: center;">
            <input class="easyui-textbox" name="speed" data-options="label:'网速',width:300,height:30,required:true,missingMessage:'网速不能为空！'">
        </div>
    </form>
    <div style="text-align:center;padding:5px 0">
        <a class="easyui-linkbutton" onclick="$('#editBandwidthForm').form('submit');" style="width:80px">提交</a>
        <a class="easyui-linkbutton" onclick="$('#editBandwidthForm').form('clear');" style="width:80px">重置</a>
    </div>
</div>
<script>
    $(function () {
        $('#editBandwidthForm').form({
            url:'../bandwidth/updateBandwidth',
            type:'post',
            success:function(data){
                var data = eval('(' + data + ')');
                if (data.result === 'success') {
                    $('#editBandwidthForm').form('clear');
                }
                $.messager.alert('提示', data.message, 'info');
            }
        });

        var row = $('#bandwidth_dg').datagrid('getSelected');
        $('#editBandwidthForm').form('load', row);
    });
</script>
</body>
</html>
